#include "univseral.h"
template<class Func, class ...Args>
auto UniveralTemplate::transformUniveral(Func&& func, Args&&...args)  ->decltype(func(args...))
{
	/*auto lambdaExpress = [&func, &args...]()mutable
	{
		func(args...);
	};

	return lambdaExpress;*/
	using typeReturn = decltype(func(std::forward<Args>...));

	std::function< typeReturn() > func= std::bind(std::forward<Func>(func), std::forward<Args>(args)...);

	return func();
}

UniveralTemplate& UniveralTemplate::getInstanceTemplate()
{
	static UniveralTemplate univeralTemplate;
	return univeralTemplate;
}
